#pragma once
#ifndef SYPX_TEXTBOX
#define SYPX_TEXTBOX

#include "GuiComponent.h"
#include "Types.h"

namespace SypX
{
	class Font;
	class SYPXAPI TextBox :	public GuiComponent
	{
	public:
		TextBox(Font* f, float width, float height, UByte horizontalPad = 2, UByte verticalPad = 2);
		virtual ~TextBox(void);
		///Draws the TextBox.
		virtual void draw();
		virtual void setText(const String& txt);
		virtual void setBorderColor(const Vec4& color);
		virtual void setBgColor(const Vec4& color);
		virtual void setTextColor(const Vec4& color);
	private:
        Font* font;
		UByte horPad;
		UByte verPad;
		String text;


		MeshInstance* bgInstance;
		MeshInstance* borderInstance;
		Mesh* border;
		Vec4 bgColor;
		Vec4 borderColor;
		Vec4 textColor;
	};

}

#endif
